# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Samuel Littley <aur@toastwaffle.com>
# Contributor: rnons <remotenonsense at gmail dot com>

pkgname=python-whoosh
pkgver=2.7.4
pkgrel=10
pkgdesc="Fast, pure-Python full text indexing, search, and spell checking library"
arch=('any')
url="https://github.com/mchaput/whoosh"
license=("BSD")
depends=('python')
makedepends=('python-setuptools' 'git')
checkdepends=('python-pytest-runner')
source=("git+https://github.com/mchaput/whoosh#tag=v$pkgver")
md5sums=('SKIP')

build() {
  cd "$srcdir"/whoosh
  python setup.py build
}

check() {
  cd "$srcdir"/whoosh
  python setup.py ptr || echo "Tests failed"
}

package() {
  cd whoosh
  python setup.py install -O1 --root="$pkgdir"
  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}
